using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace GameStateManagement.View.Gui.Components
{
    public class Button : GuiComponent
    {
        protected Texture2D Sprite, ClickedSprite;

        public Button(Vector2 position, int width, int height, Texture2D sprite, Texture2D clickedSprite)
            : base(position, width, height)
        {
            Sprite = sprite;
            ClickedSprite = clickedSprite;
        }

        public override void Update(GameTime gameTime)
        {
            if (HasBeenClicked)
            {
                HasBeenClicked = false;
            }
        }

        public override void Draw(GameTime gameTime, SpriteBatch spriteBatch)
        {
            spriteBatch.Draw(Sprite, Rectangle, Color);
        }
    }
}
